home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / netzwerk / tcp-ip / usno / docs / makefile.bsd < prev    next >
Makefile  |  1996-02-26  |  1KB  |  60 lines

  1. #!/bin/ksh
  2. # Berkeley IPC programs  for setting time over the Internet
  3. #  R. Schmidt, Time Service, USNO
  4. #
  5. CFLAGS = -O -DHPUX
  6. #  For SunOS 4.x  uncomment the next line:
  7. #CFLAGS = -O -DSUN
  8. #
  9. BIN = /usr/local/bin
  10. MAN = /usr/local/man/man1
  11. INETD = /etc
  12. # for Sun:  uncomment the next line:
  13. # INETD = /usr/etc
  14.  
  15. all:    time_set timecheck install
  16. #  This line replaces the above if you want to provide the timer server
  17. #  on your local machine through inetd:
  18. #all:    time_set timecheck timesrv install_serv
  19.  
  20. time_set:    time_set.c
  21.     $(CC) $(CFLAGS) -o time_set time_set.c
  22.  
  23. timecheck:    timecheck.c
  24.     $(CC) $(CFLAGS) -o timecheck timecheck.c 
  25.  
  26. timec:    timec.c
  27.     $(CC) $(CFLAGS) -o timec timec.c 
  28.  
  29. timesrv:    timesrv.c
  30.     $(CC) $(CFLAGS) -o timesrv timesrv.c
  31.  
  32. install:
  33.     chmod 744 time_set
  34.     chmod 755 timecheck
  35.     cp  time_set timecheck TIME_SET $(BIN)
  36.     cat etc.services>>/etc/services
  37.     cp *.1 $(MAN)
  38.  
  39. #  Only if you also want to be a time server:
  40. install_serv:
  41.     chmod 744 timesrv
  42.     chmod 744 time_set
  43.     chmod 755 timecheck
  44.     cp  timesrv time_set timecheck TIME_SET $(BIN)
  45.     cat etc.services>>/etc/services
  46.     cat etc.inetd.conf>>/etc/inetd.conf
  47.  
  48. #  On Sun, send SIGHUP to inetd:  Uncomment this line:
  49. #/bin/kill -1  `ps -ax | grep inetd | grep -v grep | cut -c 1-5 `
  50. #
  51. #  On HP, the restart for inetd is /etc/inetd -c :
  52. #  Comment out the next line for SunOS 4.x : 
  53.     $(INETD)/inetd -c
  54.     cp *.1 $(MAN)
  55.  
  56. # create shell archive:
  57. shar:
  58.     rm time.sh
  59.     shar -cmos * >time.sh
  60.